package com.example.myapplication.model;

import java.io.Serializable;

public class Course implements Serializable {
    private String name;
    private String teacher;
    private float averageRating;

    public Course(String name, String teacher) {
        this.name = name;
        this.teacher = teacher;
        this.averageRating = 0.0f;
    }

    public Course(String name, String teacher, float averageRating) {
        this.name = name;
        this.teacher = teacher;
        this.averageRating = averageRating;
    }

    public String getName() {
        return name;
    }

    public String getTeacher() {
        return teacher;
    }

    public float getAverageRating() {
        return averageRating;
    }

    public void setAverageRating(float averageRating) {
        this.averageRating = averageRating;
    }

    // 用于序列化
    private static final long serialVersionUID = 1L;
}
